package com.xuecheng.media.config;

import com.xuecheng.base.utils.FFMpegUtils;
import org.springframework.context.annotation.Configuration;
import org.springframework.beans.factory.annotation.Value;

import javax.annotation.PostConstruct;

@Configuration
public class FFMpegConfig {

    @Value("${videoprocess.ffmpegpath}")
    private String ffmpegPath;

    @Value("${videoprocess.timeout:30}")
    private long timeout;

    @PostConstruct
    public void initFFMpegUtils() {
        FFMpegUtils.init(ffmpegPath, timeout);
    }
}